﻿@using System.Data;
@using ZoomLa.BLL.Helper
@model ZoomLa.SQLDAL.SQL.PageSetting
@functions{
 public MvcHtmlString GetIsTrue(DataRow dr)
 {
     return MvcHtmlString.Create((dr["istrue"].ToString() == "1") ? ComRE.Icon_OK : ComRE.Icon_Error);
 }
}
@{
    Model.cols = 8;
}
<div id="EGV">
    <table class="table table-bordered table-striped">
        <tr><td class="td_s"></td><td class="td_s">ID</td><td>样式预览</td><td>样式名称</td><td>启用状态</td><td>添加时间</td><td>排列顺序</td><td class="td_l">操作</td></tr>
        @foreach (DataRow dr in Model.dt.Rows)
        {
            <tr ondblclick="location = 'PageStyleAdd?ID=@dr["pagenodeid"]';">
                <td align="left">
                    <input name="idchk" type="checkbox" value="@dr["PageNodeid"]" />
                </td>
                <td>@dr["PageNodeid"]</td>
                <td>
                    <img class="temple_img img_50" onerror="shownopic(this);" src="@dr["templateindexpic"]" />
                    <img class="templebig_img" onerror="shownopic(this)" src="@dr["templateindexpic"]" />
                </td>
                <td>@dr["PageNodeName"]</td>
                <td>@GetIsTrue(dr)</td>
                <td>@dr["Addtime"]</td>
                <td>@dr["Orderid"]</td>
                <td>
                    <a href="PageStyleAdd?id=@dr["PageNodeID"]" class="option_style"><span class="fa fa-pencil" title="修改"></span></a>
                    <a href="javascript:;" class="option_style" onclick="mvcpage.del({ ids: '@dr["PageNodeID"]', url: 'style_del', confirm: '确定要删除吗' });"><i class="fa fa-trash-o" title="删除"></i></a>
                    @*<a href="PageTemplate?StyleID=@dr["PageNodeID"]" title="栏目管理" class="option_style"><i class="fa fa-th-list" title="栏目管理"></i>栏目管理</a>*@
                </td>
            </tr>
        }
        @Html.Partial("_page", Model)
    </table>
</div>